<template>
  <el-card>
    <div slot="header" class="card-header">
      <span>{{ this.$route.meta.title }}</span>
      <div class="header-select">
        <i class="el-icon-menu"></i>
        <span>选择项：</span>
        <el-select v-model="selectVal" @change="selectChange">
          <el-option
            v-for="(item, index) in selectOptions"
            :key="index"
            :label="item.title"
            :value="index"
          >
          </el-option>
        </el-select>
      </div>
    </div>
    <el-card shadow="never">
      <div slot="header" class="card-header">
        <span>
          {{ selectOptions[selectVal].options[selectValB] }}
        </span>
        <el-select v-model="selectValB" @change="selectChange" size="mini">
          <el-option
            v-for="(item, index) in selectOptions[selectVal].options"
            :key="index"
            :label="item"
            :value="index"
          >
          </el-option>
        </el-select>
      </div>
      <SearchB class="mgb"></SearchB>
      <TableA class="mgb" :tableData="tableDataA"></TableA>
      <SearchA class="mgb"></SearchA>
      <TableB :tableData="tableDataB"></TableB>
    </el-card>
  </el-card>
</template>

<script>
import variable from './variable'
import TableA from './components/TableA'
import TableB from './components/TableB'
import SearchA from './components/SearchA'
import SearchB from './components/SearchB'
export default {
  components: {
    TableA,
    TableB,
    SearchA,
    SearchB
  },

  data() {
    return {
      selectVal: 0,
      selectValB: 0,
      selectOptions: variable,
      tableDataA: [
        {
          columnA: '13420203929',
          columnB: '200',
          columnC: '0',
          columnD: '宏飞信息技术',
          columnE: '无'
        },
        {
          columnA: '13520292838',
          columnB: '200',
          columnC: '0',
          columnD: '宏飞信息技术',
          columnE: '无'
        },
        {
          columnA: '13695837920',
          columnB: '0',
          columnC: '100',
          columnD: '金博亚科技',
          columnE: '无'
        },
        {
          columnA: '13779532893',
          columnB: '200',
          columnC: '100',
          columnD: '金博亚科技',
          columnE: '无'
        },
        {
          columnA: '13882892029',
          columnB: '200',
          columnC: '0',
          columnD: '金博亚科技',
          columnE: '无'
        }
      ],
      tableDataB: [
        {
          columnA: '北京',
          columnB: '12232',
          columnC: '是',
          columnD: '2020.1',
          columnE: '076423'
        },
        {
          columnA: '湖北',
          columnB: '12121',
          columnC: '是',
          columnD: '2020.1',
          columnE: '076432'
        },
        {
          columnA: '广东',
          columnB: '17632',
          columnC: '是',
          columnD: '2020.6',
          columnE: '076321'
        },
        {
          columnA: '四川',
          columnB: '19764',
          columnC: '是',
          columnD: '2020.7',
          columnE: '073331'
        },
        {
          columnA: '新疆',
          columnB: '11241',
          columnC: '是',
          columnD: '2020.1',
          columnE: '076531'
        },
        {
          columnA: '天津',
          columnB: '8976',
          columnC: '否',
          columnD: '2020.4',
          columnE: '072131'
        },
        {
          columnA: '湖南',
          columnB: '6443',
          columnC: '是',
          columnD: '2020.3',
          columnE: '076731'
        },
        {
          columnA: '河南',
          columnB: '14231',
          columnC: '是',
          columnD: '2020.2',
          columnE: '076761'
        },
        {
          columnA: '陕西',
          columnB: '34234',
          columnC: '是',
          columnD: '2020.2',
          columnE: '076891'
        },
        {
          columnA: '贵州',
          columnB: '7856',
          columnC: '是',
          columnD: '2020.1',
          columnE: '076991'
        },
        {
          columnA: '山东',
          columnB: '8766',
          columnC: '是',
          columnD: '2020.2',
          columnE: '076881'
        },
        {
          columnA: '河北',
          columnB: '12231',
          columnC: '是',
          columnD: '2020.3',
          columnE: '076651'
        }
      ]
    }
  },

  methods: {
    selectChange() {}
  }
}
</script>

<style lang="scss" scoped>
.mgb {
  margin-bottom: 20px;
}
</style>
